﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace DACK_MHTTUD_0912008_0912493
{
    public class DES_Mode
    {
        enum Enum_Mode { CBC, CFB, CTS, ECB, OFB };
        public static CipherMode Get_Cipher_Mode_From_String(string str_mode)
        {
            if (str_mode.Equals(Enum_Mode.CBC.ToString()))
                return CipherMode.CBC;
            else if (str_mode.Equals(Enum_Mode.CFB.ToString()))
                return CipherMode.CFB;
            else if (str_mode.Equals(Enum_Mode.CTS.ToString()))
                return CipherMode.CTS;
            else if (str_mode.Equals(Enum_Mode.ECB.ToString()))
                return CipherMode.ECB;
            return CipherMode.OFB;
        }
    }
}
